package com.aube.interact.fighter.model;

import com.huyn.baseframework.model.PicItem;
import com.huyn.baseframework.utils.StringUtils;

import java.io.Serializable;

/**
 * Created by huyaonan on 15/11/7.
 */
public class OptionItem implements Serializable {
    public String optionId="";
    public String optionValue="";
    public int count=0;

    //新增
    public String h5url="";
    public String answer="";//if it is the answer, value is 'Y'
    public PicItem picinfo;

    public OptionPic picRespVo;

    public boolean isRightAnswer() {
        return "Y".equalsIgnoreCase(answer);
    }

    public String getImgUrl() {
        if(picRespVo != null)
            return picRespVo.picurl;
        return null;
    }

    public boolean hasImg() {
        if(picRespVo != null && StringUtils.isNotBlank(picRespVo.picurl))
            return true;
        return false;
    }

}
